﻿<?php $this->load->view('common/header'); ?>
    <style type="text/css">
	.thumb_img img{
		width:20%;
		}
	</style>
    <body>
       <?php $this->load->view('common/top-navbar'); ?>
        <div class="wrapper">
            <div class="container">
                <div class="row">
                    <div class="span3">
                        <?php $this->load->view('common/sidebar'); ?>
                    </div>
                    <!--/.span3-->
                    <div class="span9">
                        <div class="content">
                            <div class="module">
                                <div class="module-head">
                                    <h3>
                                        Recent Products</h3>
                                </div>
                                <div class="module-body table">
                                    <table cellpadding="0" cellspacing="0" border="0" class="datatable-1 table table-bordered table-striped	 display"
                                        width="100%">
                                        <thead>
                                            <tr>
                                                <th>
                                                    ID
                                                </th>
                                                <th>
                                                    Product Code
                                                </th>
                                                <th>
                                                    Product Name
                                                </th>
                                                <th>
                                                    Product Image
                                                </th>
                                                <th>
                                                    Status
                                                </th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                           <?php foreach($products->result() as  $row): ?>
                                            <tr class="even gradeA">
                                                <td>
                                                   <?php echo $row->product_id; ?>
                                                </td>
                                                <td>
                                                    <?php echo $row->product_code; ?>
                                                </td>
                                                <td>
                                                     <?php echo $row->product; ?>
                                                </td>
                                                <td class="thumb_img">
                                                     <img src="<?php echo base_url(); ?>assets/product_images/<?php echo $row->product_image_url; ?>" />
                                                </td>
                                                <td>
                                                    <?php echo $row->status; ?>
                                                </td>
                                            </tr>
                                         <?php endforeach; ?>
                                         </tbody>
                                     </table>
                                </div>
                            </div>
                            <!--/.module-->
                            
                            <div class="module">
                                <div class="module-head">
                                    <h3>
                                        Recent Categories</h3>
                                </div>
                                <div class="module-body table">
                                    <table cellpadding="0" cellspacing="0" border="0" class="datatable-1 table table-bordered table-striped	 display"
                                        width="100%">
                                        <thead>
                                            <tr>
                                                <th>
                                                    ID
                                                </th>
                                                <th>
                                                    Category Name
                                                </th>
                                                
                                            </tr>
                                        </thead>
                                        <tbody>
                                           <?php foreach($categories->result() as  $category): ?>
                                            <tr class="even gradeA">
                                                <td>
                                                   <?php echo $category->category_id; ?>
                                                </td>
                                                <td>
                                                    <?php echo $category->category; ?>
                                                </td>
                                                
                                            </tr>
                                         <?php endforeach; ?>
                                         </tbody>
                                     </table>
                                </div>
                            </div>
                            <!--/.module-->
                        </div>
                        <!--/.content-->
                    </div>
                    <!--/.span9-->
                </div>
            </div>
            <!--/.container-->
        </div>
        <!--/.wrapper-->
        <?php $this->load->view('common/footer'); ?>
